package subject_set.weekly_competition.day10_2;

/**
 * @author haomin
 * @date 2022/10/02 10:28
 **/
public class Num1 {
    class Solution {
        public int commonFactors(int a, int b) {
            int ans = 0;
            int ret = Math.max(a, b);
            for(int i = 1; i <= ret; ++i){
                if(a % i == 0 && b % i == 0) ans++;
            }
            return ans;
        }
    }
}